package com.ky.gp.app.controller;

import com.ky.common.vo.R;
import com.ky.gp.app.service.WordsFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * --- 天道酬勤 ---
 *
 * @author fhn
 * @date 2024/6/21
 * @desc -- 代码敲烂 月薪过万--
 */
@RestController
@RequestMapping("/api/home")
public class WordsController {
    @Autowired
    WordsFeign wordsFeign;
    @RequestMapping("/words/getRandomWord")
    public R getRandomWord(){
        return wordsFeign.getRandomWord();
    }
    @RequestMapping("/words/getTodayWordNum")
    public R getTodayWordNum(){
        return wordsFeign.getTodayWordNum();
    }
    @RequestMapping("/words/recitation")
    public R recitation(){
        return wordsFeign.recitation();
    }
    @RequestMapping("/words/recitationWordNum")
    public R recitationWordNum(){
        return wordsFeign.recitationWordNum();
    }
    @RequestMapping("/wrong-questions/collectionWord/{id}")
    public R collectionWord(@PathVariable("id")int id){
        return wordsFeign.collectionWord(id);
    }
    @RequestMapping("/wrong-questions/collectionWordList")
    public R collectionWordList(){
        return wordsFeign.collectionWordList();
    }

}
